/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package utilities;

import java.util.Random;
import java.util.prefs.Preferences;

/**
 *
 * @author olawale
 */
public class Store {

    private static final String accessToken = "oauth_token";
    private static final String tokenSecret = "oauth_token_secret";
    private static final String userId = "user_id";
    private static final String screenName = "screen_name";
    private static final String message = "message";
    private static final String event = "event";
    private static final String eventDate = "eventDate";

    static Preferences pref = Preferences.userNodeForPackage(Store.class);

    public static void main(String ...args){
//        System.out.println(getAccessToken());
//        System.out.println(getTokenSecret());
//        System.out.println(getUserId());
//        System.out.println(getScreenName());
        System.out.println("1-10-2009".matches("[0-3]?[0-9]-[0-1]?[0-2]-[2][0][0-1][0-9]"));
        String s = "new";
        String d = "new";

        Random r = new Random();
        System.out.println(r.nextInt(1000));
    }

    public static String getAccessToken(){
        return pref.get(accessToken, "");
    }

    public static String getTokenSecret(){
        return pref.get(tokenSecret, "");
    }

    public static String getUserId(){
        return pref.get(userId, "");
    }

    public static String getScreenName(){
        return pref.get(screenName, "");
    }

    public static String getMessage(){
        return pref.get(message, "");
    }

    public static String getEvent(){
        return pref.get(event, "");
    }

    public static String getEventDate(){
        return pref.get(eventDate, "");
    }

    public static void store(String key, String value){
        pref.put(key, value);
    }

}
